
package com.cmc.service.impl;

import java.util.List;

import com.cmc.service.impl.BaseManager;
import com.cmc.model.Reason;
import com.cmc.dao.ReasonDao;
import com.cmc.service.ReasonManager;
/*
* @aegis.mapping
*/
public class ReasonManagerImpl extends BaseManager implements ReasonManager {
    private ReasonDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setReasonDao(ReasonDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.cmc.service.ReasonManager#getReasons(com.cmc.model.Reason)
     */
    public List getReasons(final Reason reason) {
        return dao.getReasons(reason);
    }

    /**
     * @see com.cmc.service.ReasonManager#getReason(String id)
     */
    public Reason getReason(final String id) {
        return dao.getReason(new Long(id));
    }

    /**
     * @see com.cmc.service.ReasonManager#saveReason(Reason reason)
     */
    public void saveReason(Reason reason) {
        dao.saveReason(reason);
    }

    /**
     * @see com.cmc.service.ReasonManager#removeReason(String id)
     */
    public void removeReason(final String id) {
        dao.removeReason(new Long(id));
    }
}
